//package com.yutian.web.controller;
//
//import com.yutian.common.annotation.Log;
//import com.yutian.common.core.controller.BaseController;
//import com.yutian.common.core.domain.AjaxResult;
//import com.yutian.common.core.page.TableDataInfo;
//import com.yutian.common.enums.BusinessType;
//import com.yutian.selfservice.support.ListService;
//import com.yutian.selfservice.support.utils.Result;
//import com.yutian.web.service.ServiceManagerService;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.ModelMap;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
//@Controller
//@RequestMapping("/serviceManager")
//public class ServiceManagerController extends BaseController {
//    public static final String prefix = "/selfservice/manager/";
//    @Autowired
//    private ServiceManagerService serviceManagerService;
//
//    @RequestMapping("")
//    @RequiresPermissions("system:serviceManager:list")
//    public String serviceType() {
//        return prefix + "/manager";
//    }
//
//    @RequiresPermissions("system:serviceManager:list")
//    @PostMapping("/list")
//    @ResponseBody
//    public Result list(@RequestBody @Validated ListService listService) {
//        return serviceManagerService.selectList(listService);
//    }
//
//
//    @RequiresPermissions("system:serviceManager:remove")
//    @Log(title = "服务类型管理", businessType = BusinessType.DELETE)
//    @PostMapping("/remove")
//    @ResponseBody
//    public Result remove(@RequestBody @Validated ListService listService) {
//        return serviceManagerService.delete(listService);
//    }
//
//
//    @GetMapping("/add")
//    public String add() {
//        return prefix + "/add";
//    }
//
//
//    @RequiresPermissions("system:serviceManager:add")
//    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
//    @PostMapping("/addSave")
//    @ResponseBody
//    public Result addSave(@Validated @RequestBody ListService listService) {
//        return serviceManagerService.add(listService);
//    }
//
//
//    @PostMapping("/edit")
//    @RequiresPermissions("system:serviceManager:edit")
//    public String edit(@RequestBody @Validated ListService listService, ModelMap mmap) {
//        mmap.put("type", serviceManagerService.select(listService));
//        return prefix + "edit";
//    }
//
//    @RequiresPermissions("system:serviceManager:edit")
//    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
//    @PostMapping("/editSave")
//    @ResponseBody
//    public Result editSave(@RequestBody @Validated ListService listService) {
//        return serviceManagerService.edit(listService);
//    }
//}
